package com.nageoffer.jobtrain.projects.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.nageoffer.jobtrain.common.web.result.Result;
import com.nageoffer.jobtrain.projects.dto.req.OjQuestionSubmitReqDTO;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户提交代码判题限流处理
 * author：唐晨
 */
public class CustomBlockHandler {
    public static Result<Void> ojQuestionSubmitCodeByRocketMQ(@RequestBody OjQuestionSubmitReqDTO requestParam, BlockException blockException) {
        return new Result<Void>()
                .setCode("B100000")
                .setMessage("您的提交过于频繁，请稍候重试 ...");
    }
}
